package work.lianwei;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;

public class OssDemo {
    public static void main(String[] args) {
        String fileName = "test/test.jpg";
        String endpoint = "https://oss-cn-shanghai.aliyuncs.com";
        String key = "LTAI5tQQEZ6jQwPfZaeDk8LK";
        String secret = "8XeISmSdS7PzdofpOxUzppvk27lXQ1";
        String buketName = "oss-socialcrm-show-pro";
        OSS ossClient = new OSSClientBuilder().build(
                endpoint,
                key,
                secret);

        boolean b = ossClient.doesObjectExist(buketName, fileName);
        System.out.println(b);

    }
}
